<%@page import="hyl.ext.base.TokenFactory,hyl.ext.base.MyToken"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html lang="zh-CN">

<head>
<meta charset="UTF-8">

<meta
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
	name="viewport" />
<!-- 全局变量 函数定义区 见top.jsp -->
<%@ include file="pub/top1.jsp"%>
<title><%=SYSTEMNAME%></title>
<!-- 实例变量 函数定义区 -->
<%
//网页title String JSPTITLE="登录" ;
%>
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>登录</title>
<meta name="keywords" content="HTML5,登录">
<meta name="description" content="HTML5 登录。">
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>cssjs/bootstrap/bootstrap.min.css">
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>cssjs/login2/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>cssjs/login2/css/material-design-iconic-font.min.css">
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>cssjs/login2/css/util.css">
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>cssjs/login2/css/main.css">
</head>

<body>
	<div class="limiter">
		<div class="container-login100"
			style="background-image: url('<%=basePath%>cssjs/login2/image/bg-01.jpg');">
			<div class="wrap-login100 p-l-40 p-r-40 p-t-30 p-b-30">
				<form class="login100-form validate-form">
					<span class="login100-form-title p-b-15">登录</span>

					<div class="wrap-input100 validate-input m-b-15"
						data-validate="请输入用户名">

						<input class="input100" type="text" name="username"
							placeholder="请输入用户名" autocomplete="off"> <span
							class="focus-input100" data-symbol="&#xf206;"></span>
					</div>

					<div class="wrap-input100 validate-input" data-validate="请输入密码">

						<input class="input100" type="password" name="pass"
							placeholder="请输入密码"> <span class="focus-input100"
							data-symbol="&#xf190;"></span>
					</div>

					<div class="text-right p-t-8 p-b-10">
						<a href="javascript:">忘记密码？</a>
					</div>

					<div class="container-login100-form-btn">
						<div class="wrap-login100-form-btn">
							<div class="login100-form-bgbtn"></div>
							<button class="login100-form-btn">登 录</button>
						</div>
					</div>

					<div class="txt1 text-center p-t-20 p-b-20">
						<span>第三方登录</span>
					</div>

					<div class="flex-c-m">
						<a href="#" class="login100-social-item bg1"> <i
							class="fa fa-wechat"></i>
						</a> <a href="#" class="login100-social-item bg2"> <i
							class="fa fa-qq"></i>
						</a> <a href="#" class="login100-social-item bg3"> <i
							class="fa fa-weibo"></i>
						</a>
					</div>

					<div class="flex-col-c p-t-20">
						<a href="javascript:" class="txt2">立即注册</a>
					</div>
				</form>
			</div>
		</div>
	</div>
	<script src="<%=basePath%>cssjs/jquery/jquery-3.2.1.min.js"></script>
	<script src="<%=basePath%>cssjs/login2/js/main.js"></script>

	<script type="module">
		import "<%=basePath%>cssjs/hyl/core/fun.js";
		import "<%=basePath%>cssjs/Mm.js";
		HYL_URLS.URL_DAO_PUBLICKEY = BASEPATH.concat("l/publickey");
		HYL_URLS.URL_DAO_KEY = BASEPATH.concat("l/sm4key");
		HYL_URLS.URL_DAO_LOGIN = BASEPATH.concat("l/login");
		var e能否提交 = false;

		function message(e) {
			layer.msg(e, { icon: 0, anim: 5, time: 800 }, function () {
				// layer.msg('提示框关闭后的回调');
			});
		}
		$(document).ready(function () {
			Mm.f准备(HYLSessionKey, HYL_URLS, () => {
				e能否提交 = true;
			});
			$("#submit").click(function () {
				if (!e能否提交) return;
				let uname = $("#用户名").val(); 
				let upass = $("#密码").val();
				if (HYL登录状态 == "1") {
					window.location =  HYL_URLS.URL_MAIN;
					return;
				}
				Mm.f登录(uname, upass,
				data => {}, (e) => {message(e)});
			});
		});


	</script>
</body>

</html>